import 'package:flutter/material.dart';

///@Description(描述)     xxxx
///@author(作者)          zhangyinhong
///@create(时间)          2025-05-28 14:51

extension AppStylesExtension on BuildContext {
  ///兼容横竖屏
  EdgeInsets get hsBottomBtnPadding {
    final mediaQuery = MediaQuery.of(this);
    final bottomPadding = mediaQuery.padding.bottom;
    final isLandscape = mediaQuery.orientation == Orientation.landscape;

    return EdgeInsets.only(
      left: isLandscape ? 32 : 24,
      right: isLandscape ? 32 : 24,
      bottom: 24 + bottomPadding,
      top: 12,
    );
  }

  EdgeInsets get bottomBtnPadding {
    return EdgeInsets.only(
      left: 24,
      right: 24,
      bottom: MediaQuery.of(this).padding.bottom + 12,
      top: 12,
    );
  }
}

